<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算器</title>
    <link href="./calcu.css" rel="stylesheet">
    <script src="./calcu.js"></script>
</head>
<body>
    <div id="show-info" >
        
    </div>
    <div class="keys">
        <div class="left">
        <button class="opbtn" onclick="cal(this)" >sin</button>
        <button  class="opbtn" onclick="cal(this)" value="sqrt">&radic;x</button>
        <button class="opbtn" onclick="show(this)" value="**">x<sup>y</sup></button>
        <button class="opbtn" onclick="cal(this)" value="double">x<sup>2</sup></button>
        <button class="opbtn" onclick="cal(this)">cos</button>
        <button class="op" onclick="cal(this)" value="clear">C</button>
        <button style="font-size: large;" class="op" onclick="show(this)" value="/">&divide;</button>
        <button style="font-size: large;" class="op" onclick="show(this)" value="*">&times;</button>
        <button class="opbtn" onclick="cal(this)">tan</button>
        <button class="num" onclick="show(this)">7</button>
        <button class="num" onclick="show(this)">8</button>
        <button class="num" onclick="show(this)">9</button>
        <button class="opbtn" onclick="cal(this)">lg</button>
        <button class="num" onclick="show(this)">4</button>
        <button class="num" onclick="show(this)">5</button>
        <button class="num" onclick="show(this)">6</button>
        <!-- <button >+</button> -->
        <button class="opbtn" onclick="cal(this)">ln</button>
        <button class="num" onclick="show(this)">1</button>
        <button class="num" onclick="show(this)">2</button>
        <button class="num" onclick="show(this)">3</button>
        <!-- <div id="equal"> -->
        <!-- </div> -->
        <button class="num" onclick="show(this)" >e</button>
        <button class="opbtn" onclick="show(this)">%</button>
        <button class="num" onclick="show(this)">0</button>
        <button class="num" onclick="show(this)">.</button>
        </div>
        <div class="right">
        <button class="op" onclick="show(this)" >&pi;</button>
        <button class="op" onclick="cal(this)" value="back">&rarr;</button>
        <button class="op" onclick="show(this)">-</button>
        <button class="op" onclick="show(this)">+</button>
        <button style="flex: 2;" id="equal" onclick="cal(this)">=</button>
        </div>
    </div>    
    <footer >
        <label>设定精度:</label><input type="number" onclick="change_pre(this)" value="2" style="width: 40px;"/>
        <button onclick="change_num()">取相反数</button>
    </footer>
</body>
    <script src="./calcu.js"></script>
</html>